package com.example.j20240321.demos.web;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/log")
public class LoggerController {
    private static final Logger logger= LoggerFactory.getLogger(LoggerController.class);
    @RequestMapping("/printLog")
    public String printLog(){
        System.out.println("打印日志");
        logger.info("===========我是日志对象打印的日志======");
        return "success";
    }
}
